Python / Basics / Setup and running
Setup & Running
-
Approch 1:
Install python
1. open microsoft store (type in the search panel)
2. search python in the microsoft store
Create new page myapp.py
print("Hello, world!") Run
python3 myapp.py Create exe file
install pyinstaller
pip install pyinstaller python3 -m PyInstaller myapp.py -
Approch 2: Anaconda
download Anaconda
1. download from https://www.anaconda.com/products/distribution/download-success-distro
2. install
3. select Environment tab from left panel
4. click on create new button
5. add and save new env
Spider Editor
1. Anaconda navigator
2. Select home
3. search and Install spyder
4. Create new file myapp.py in spider editor
install pyinstaller and build exe
1. click on newly created env and select terminal option from the context menu
2. run command
pip install pyinstaller 3. in anaconda terminal or cmd terminal, navigate to to C:/Users/admin/.spyder-py3
4. in terminal , run the file
python3 myapp.py 5. make exe
- rename myapp.py to myapp.pyw
- in terminal,
pyinstaller --onefile myapp.pyw - myapp.exe is created in C:/Users/admin/.spyder-py3/dist